Skip to content

fix+refactor: JSON flattening, custom partition check #1055

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 27, 2024

Conversation

de-sh
Copy link
Contributor

@de-sh de-sh commented Dec 25, 2024

Fixes #XXXX.

Description

  • Refactor parts of JSON flattening code to improve readability and performance(lesser cloning).
  • Fixes custom partition check by not allowing objects, arrays as well.
  • Adds tests and documentation also

This PR has:

  • been tested to ensure log ingestion and log query works.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added documentation for new or modified features or behaviors.

@coveralls
Copy link

coveralls commented Dec 25, 2024

Pull Request Test Coverage Report for Build 12502970180

Details

  • 222 of 303 (73.27%) changed or added relevant lines in 9 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.3%) to 11.838%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/handlers/http/ingest.rs 0 1 0.0%
src/utils/json/mod.rs 5 6 83.33%
src/handlers/http/modal/utils/ingest_utils.rs 0 2 0.0%
src/storage/object_storage.rs 0 2 0.0%
src/alerts/mod.rs 0 4 0.0%
src/handlers/http/logstream.rs 0 5 0.0%
src/handlers/http/modal/utils/logstream_utils.rs 0 10 0.0%
src/metadata.rs 0 11 0.0%
src/utils/json/flatten.rs 217 262 82.82%
Files with Coverage Reduction New Missed Lines %
src/utils/json/flatten.rs 1 85.35%
src/handlers/http/modal/utils/logstream_utils.rs 1 0.0%
Totals Coverage Status
Change from base Build 12492981664: 0.3%
Covered Lines: 2152
Relevant Lines: 18178

💛 - Coveralls

@de-sh de-sh changed the title refactor: JSON flattening refactor: JSON flattening, fix custom partition check Dec 26, 2024
@de-sh de-sh changed the title refactor: JSON flattening, fix custom partition check fix+refactor: JSON flattening, custom partition check Dec 26, 2024
Copy link
Contributor

@nikhilsinhaparseable nikhilsinhaparseable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to merge

@nitisht nitisht merged commit 603b095 into parseablehq:main Dec 27, 2024
6 checks passed
@de-sh de-sh deleted the flattening branch December 27, 2024 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants